import request from '@/utils/request'

// 查询项目演示列表
export function listProject(query) {
  return request({
    url: '/manage/project/list',
    method: 'get',
    params: query
  })
}

// 查询项目演示详细
export function getProject(projectId) {
  return request({
    url: '/manage/project/' + projectId,
    method: 'get'
  })
}

// 根据作品id查询项目演示详细
export function getProjectByworkId(workId) {
  return request({
    url: '/manage/project/by/' + workId,
    method: 'get'
  })
}

// 新增项目演示
export function addProject(data) {
  return request({
    url: '/manage/project',
    method: 'post',
    data: data
  })
}

// 修改项目演示
export function updateProject(data) {
  return request({
    url: '/manage/project',
    method: 'put',
    data: data
  })
}

// 删除项目演示
export function delProject(projectId) {
  return request({
    url: '/manage/project/' + projectId,
    method: 'delete'
  })
}
